package org.veridiandynamics.server.model;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.veridiandynamics.server.domain.Patient;
import org.veridiandynamics.server.domain.TreatmentRecord;

public class DoctorModel {
	public HashMap<Date, Float> getPatientHealthHistory(Patient patient) {
		List<TreatmentRecord> treatmentRecords = patient.getTreatmentRecordList();
		HashMap<Date, Float> patientHealthHistory = new HashMap<Date, Float>();
		for (TreatmentRecord record : treatmentRecords) {
			Date treatmentDate = record.getTreatmentDate();
			Map<String, String> vitalSigns = record.getVitalSigns();
			String weightString = vitalSigns.get("Weight");
			Float weightFloat = Float.parseFloat(weightString);
			patientHealthHistory.put(treatmentDate, weightFloat);
		}
		return patientHealthHistory;
	}
	
	public Float getIncomeStatement(Date date) {
		return null;
	}
}
